import java.util.Arrays;

/**
 * 
 */

/**
 * @author chenlin
 *
 */
public class Num2Rmb {

	/**
	 * @param Num2Rmb
	 */
	private String [] hanArr={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
	private String [] unitArr={"十","百","千"};
	private String [] divide(double num){
		long zheng=(long)num;
		long xiao=Math.round((num-zheng)*100);
		return new String[]{zheng+"",xiao+""};	
	}
	private String toHanzi(String num){
		String result="";
		int length=num.length();
		for (int i=0;i<length;i++)
		{
			int number=num.charAt(i)-48;
			if(number!=0&&i!=length-1){
				result+=hanArr[number]+unitArr[length-i-2];
			}else{
				result+=hanArr[number];
			}
		}
		return result;
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Num2Rmb nr=new Num2Rmb();
		System.out.println(Arrays.toString(nr.divide(236711125.123)));
		System.out.println(nr.toHanzi("1024"));
	}

}
